<html>
<script>
    /**
 * @param {string} s
 * @return {boolean}
 */
var repeatedSubstringPattern = function(s) {
    if(!s){
        return false;
    }
    const n = s.length;

    for(let i = 0;i<n-1;i++){
        if(n%(i + 1) === 0){
            const sp = s.slice(0,i+1);
            if(s.split(sp).filter(i => !!i).length === 0){
                return true;
            }
        }
    }
    return false;
};


</script>
</html>